package drds.global_transaction;

import drds.common.Author;
import lombok.Getter;
import lombok.NonNull;
import lombok.Setter;

import java.io.Serializable;

@Author(name = Authors.LI_YANG)
public class TransactionId implements Serializable
{
    @Setter
    @Getter
    private String globalTransactionId;
    @Setter
    @Getter
    private String branchTransactionId;

    public TransactionId()
    {
    }

    public TransactionId(@NonNull String globalTransactionId)
    {
        this.globalTransactionId = globalTransactionId;
        this.branchTransactionId = null;
    }

    public TransactionId(@NonNull String globalTransactionId, @NonNull String branchTransactionId)
    {
        this.globalTransactionId = globalTransactionId;
        this.branchTransactionId = branchTransactionId;
    }


}
